<?php

class Soul_Template_Html_Form_Checkbox extends Soul_Template_Html_Form_Input {
	
    public function  __construct() {
        $this->templateName = 'form/checkbox';
    }

    protected function renderReadonly(){
		return '';
    }

    protected function renderEditable(){
        if (!$this->getEnabled()) {
            $this->addClass('disabled');
            $this->setAttribute('disabled', 'disabled');
        }
        $this->setAttribute('type', 'checkbox');
        if($this->getValue()){
        	$this->setAttribute('value', $this->getValue());
        }
        return '<input ' . $this->getAttributeHtml() . '/>';
    }
}